

/* Bring in data from 1_Data_Cleaning.do */
clear all
use "data/outputs/clean_mm.dta", clear 


**-------------------**
** Do voters update? **
**-------------------**

/* collapse to three scenarios */
gen exp2_scenario_alt = 1 if exp2_scenario == 1 | exp2_scenario == 2
replace exp2_scenario_alt = 2 if exp2_scenario == 3
replace exp2_scenario_alt = 3 if exp2_scenario == 0  

label variable exp2_scenario_alt "Did governor succeed?"
label define exp2_scenario_altl 1 "No", replace
label define exp2_scenario_altl 2 "Yes, with opposition", add
label define exp2_scenario_altl 3 "Yes, without opposition", add
label values exp2_scenario_alt exp2_scenario_altl

/* define sample */
gen sample3=1 if spillover!=. & how_democ!=. 

/* do voters update? */
eststo exp33a: reg spillover i.exp2_scenario_alt if sample3==1, robust
eststo exp33b: reg spillover i.exp2_scenario_alt  if exp2_attention == 1 & sample3==1, robust 
eststo exp34a: reg how_democ i.exp2_scenario_alt if sample3==1, robust
eststo exp34b: reg how_democ i.exp2_scenario_alt if exp2_attention == 1 & sample3==1, robust  

/* export results */
esttab exp33a exp33b exp34a exp34b /*
*/ using "outputs/Table4.tex", b(3) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) /*
*/ keep (2.exp2_scenario_alt 3.exp2_scenario_alt _cons) /*
*/ mgroups("\textbf{Will Governor's Plan Pass}" "\textbf{How Democratic is US}", pattern(1 0 1 0 ) /*
*/ span prefix(\multicolumn{@span}{c}{) suffix(}) erepeat(\cmidrule(lr){@span})) nomtitles /*
*/ varlabels(2.exp2_scenario_alt "Passed with opposition" /*
*/ 3.exp2_scenario_alt "Passed without opposition" /*
*/ _cons "Constant (Did not pass mean)") se r2 label replace


/* End */
